setAdmin

  • function
 

Sets the user's admin status.

viewmodel.setAdmin(user, isAdmin)

Sets the user's admin status.

Parameters

  1. user {User}

    The user object that will be set or unset as an admin.

  2. isAdmin {Boolean}

    Whether the user should be set as an admin.

Returns

{Promise<User | } | The | save | promise | that | resolves | to | a>}

@return {Promise<bitballs/models/user} The save promise that resolves to a user.